{extend name="base" /} {block name="body"}
<div class="layui-body">
	<div class="navbar">
		<a><cite>系统设置</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href="{:url('index')}"><cite>菜单权限</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>编辑菜单</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-card margin10">
		<ul class="layui-tab-title">
			<li class="layui-this">编辑菜单</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form form-container layui-form-pane" action="{:url()}" method="post">
				<div class="layui-form-item">
					<label class="layui-form-label">上级菜单</label>
					<div class="layui-input-block">
						<select name="pid" lay-verify="required">
							<option value="0">一级菜单</option>
							{foreach name="admin_menu_level_list" item="vo"}
							<option value="{$vo.id}" {if condition="$admin_menu.id==$vo.id" } disabled="disabled" {/if} {if condition="$admin_menu.pid==$vo.id" } selected="selected" {/if}>
								{neq name="vo.level" value="1"}|{for start='1' end='$vo.level'} ---- {/for}{/neq} {$vo.title}</option>
							{/foreach}
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">菜单名称</label>
					<div class="layui-input-block">
						<input type="text" name="title" value="{$admin_menu.title}" required lay-verify="required" placeholder="请输入菜单名称" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">控制器方法</label>
					<div class="layui-input-block">
						<input type="text" name="name" value="{$admin_menu.name}" required lay-verify="required" placeholder="请输入控制器方法" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">图标</label>
					<div class="layui-input-block">
						<input type="text" name="icon" value="{$admin_menu.icon}" placeholder="（选填）如：fa fa-home" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-block">
						<input type="radio" name="status" value="1" title="显示" {if condition="$admin_menu.status==1" } checked="checked" {/if}>
						<input type="radio" name="status" value="0" title="隐藏" {if condition="$admin_menu.status==0" } checked="checked" {/if}>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">排序</label>
					<div class="layui-input-block">
						<input type="text" name="sort" value="{$admin_menu.sort}" required lay-verify="required" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<input type="hidden" name="id" value="{$admin_menu.id}">
						<button class="layui-btn" lay-submit lay-filter="*"><i class="fa fa-save"></i> 保存</button>
						<a href="{:url('index')}" class="layui-btn layui-btn-primary"><i class="fa fa-arrow-left"></i> 返回</a>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
{/block}